#{extends 'CRUD/layout.html' /}
#{extends 'main.html' /}
#{set title:'CoolSoft - All Roles' /}
<div id="crudList" class="${type.name}">
	
	<h2 id="crudListTitle">&{'Roles', type.name}</h2>
    #{if controllers.Security.checkPermission('Edit System Role',null)}
	<div>
	#{list items:rList, as:'inheritRole'}
		<a href="@{RoleCRUD.show(inheritRole.id)}">${inheritRole.title}</a>	
		<br>
	#{/list}
	</div>
	#{/if}
	#{if controllers.Security.checkPermission('Edit System Role',null)==false}
	<div>
	#{list items:rList, as:'inheritRole'}
		${inheritRole.title}	
		<br>
	#{/list}
	</div>
	#{/if}
	    #{if controllers.Security.checkPermission('Create System Role',null)}
	<p id="crudListAdd">
		<a href="@{blank(r.id)}">+ &{'crud.add', "New " + type.modelName}</a>
	</p>
	#{/if}
	<br>
	Want to view Roles in a certain Project? <a href="@{RoleCRUD.showAllProjects()}">Click here.</a>

</div>
